package com.sky.controller.user;

import com.sky.result.Result;
import com.sky.service.ShopService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.*;

import static com.sky.constant.RedisConstant.SHOP_STATUS_KEY;

@RestController("userShopController")
@Slf4j
@RequestMapping("/user/shop")
@Api(tags = "用户端-店铺相关接口")
@RequiredArgsConstructor
public class ShopController {
    private final ShopService shopService;

    /**
     * 获取到店铺的营业状态
     *
     * @return
     */
    @GetMapping("/status")
    @ApiOperation("获取到店铺的营业状态")
    public Result<Integer> getStatus() {
        return Result.success(shopService.getStatus());
    }
}
